package com.repair.admin.worker.controller;

import com.repair.admin.worker.service.AdminWorkerService;
import com.repair.api.worker.request.param.WorkerQueryParam;
import com.repair.api.worker.response.data.WorkerInfo;
import com.repair.api.worker.service.WorkerFacadeService;
import com.repair.base.result.JsonResult;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 *
 * @author zq
 * @version 1.0
 * @create 2024-10-02 22:49
 * @since jdk1.8
 */
@RestController
@RequestMapping("/workerAdmin/")
public class AdminWorkerController {
    @Autowired
    private AdminWorkerService adminworkerService;
    @GetMapping("getAllWorkerInfo")
    public JsonResult<List<WorkerInfo>> getAllWorkers(WorkerQueryParam workerQueryParam){
        List<WorkerInfo> allWorkers = adminworkerService.getAllWorkers(workerQueryParam);
        return JsonResult.ok(allWorkers);
    }

}
